package com.kingbook.common.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.Closeable;
import java.io.IOException;

/**
 * 2016年10月22日 下午4:06:12
 * Version 1.0
 */
public class CloseableUtils {

	private static Logger logger = LoggerFactory.getLogger(CloseableUtils.class);
	
	public static void cleanup(Closeable... closeables){
		for (Closeable c : closeables) {
			if (c != null) {
				try {
					c.close();
				} catch (IOException e) {
					logger.error("",e);
				}
			}
		}
	}
}
